package com.red.controller.user;

import com.red.service.RankingsService;
import com.red.vo.RankingsViewVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Objects;

@RestController
@RequestMapping("/user/ranking")
@Slf4j
@ApiModel(value = "答题排行榜相关接口")
public class RankingsController {
    @Autowired
    private RankingsService rankingsService;

    /**
     * 查询排行榜
     * @return
     */
    @GetMapping("rankingAll")
    @ApiModelProperty("查询排行榜")
    public RankingsViewVO rankingAll(){
       return rankingsService.getAll();
    }
}
